<?php

class SegmentosView extends Segmentos{
	
	public function listar($arr){
		$total = count($arr);
		for($i = 0;$i < $total;$i++){
				echo '<tr>';
					echo '<td width="40%">',$arr[$i]['titulo'],'</td>';
					echo '<td width="20%" align="center" onclick="javascript:editar(',$arr[$i]['idsegmentos'],',\'segmentos\');" class="tabelaB"><img src="images/app-edit-icon.png" width="20" align="absmiddle" /> Editar</td>';
					echo '<td width="20%" id="editar" align="center" onclick="javascript:excluir(',$arr[$i]['idsegmentos'],',\'Segmentos\');" class="tabelaB"><img src="images/app-delete-icon.png" width="20" align="absmiddle" /> Excluir</td>';
				echo '</tr>';
	    }
	}
	public function visualizar($arr){
		$total = count($arr);
		for($i = 0;$i < $total;$i++){
			echo '<a href="segmentos.php?i=',$arr[$i]['idsegmentos'],'" ><h3>',$arr[$i]['titulo'],'</h3></a>';	
		}
	}
	public function select($arr){
		$total = count($arr);
		for($i = 0;$i < $total;$i++){
			echo '<option value="',$arr[$i]['idsegmentos'],'">',$arr[$i]['nome'],'</option>';
	    }
	}
}
?>